package com.beg.cant.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;
import java.lang.Long;
@Data
@TableName("posts")
public class Post {
    @TableId(type = IdType.AUTO)
    @NotNull
    @Schema(description = "动态ID", example = "1", required = true)
    private Long id;

    @Schema(description = "用户的ID", example = "1")
    private Long userId;

    @Schema(description = "图片URL", example = "https://example.com/post.jpg")
    private String image;

    @Schema(description = "动态内容", example = "This is a great day.", required = true)
    private String content;

    @Schema(description = "发布时间", example = "2025-03-05T10:12:44", readOnly = true)
    private LocalDateTime createdAt;
}